


use Table A15-16.dta
set more off
set scheme s1mono



********************************************************************************
**************************** mixed-effects models (rmle)           *************
**************************** (see table a15 in online appendix)    *************
********************************************************************************

xtset country


/*united states*/
mixed us_4 edu_level demo c.income##c.income unequal ///
situation conser patriot pointerest urban male religiosity age i.occupation ///
|| country: , reml dfmethod(satterthwaite)
estat icc
estat ic
outreg2 using us_me.xls, excel label dec(2) 2aster replace

mixed us_4 c.edu_level##i.labor demo c.income##c.income unequal ///
situation conser patriot pointerest urban male religiosity age i.occupation ///
|| country: , reml dfmethod(satterthwaite)
estat icc
estat ic
outreg2 using us_me.xls, excel label dec(2) 2aster append


/*china*/
mixed cn_4 edu_level demo c.income##c.income unequal ///
situation conser patriot pointerest urban male religiosity age i.occupation ///
|| country: , reml dfmethod(satterthwaite)
estat icc
estat ic
outreg2 using cn_me.xls, excel label dec(2) 2aster replace

mixed cn_4 c.edu_level##i.capital demo c.income##c.income unequal ///
situation conser patriot pointerest urban male religiosity age i.occupation ///
|| country: , reml dfmethod(satterthwaite)
estat icc
estat ic
outreg2 using cn_me.xls, excel label dec(2) 2aster append


/*japan (exclude respondents in japan)*/
drop if country==1
mixed jp_4 edu_level demo c.income##c.income unequal ///
situation conser patriot pointerest urban male religiosity age i.occupation ///
|| country: , reml dfmethod(satterthwaite)
estat icc
estat ic
outreg2 using jp_me.xls, excel label dec(2) 2aster replace

mixed jp_4 c.edu_level##i.labor demo c.income##c.income unequal ///
situation conser patriot pointerest urban male religiosity age i.occupation ///
|| country: , reml dfmethod(satterthwaite)
estat icc
estat ic
outreg2 using jp_me.xls, excel label dec(2) 2aster append



********************************************************************************
******************* pairs cluster bootstrapped t-statistics ********************
******************* (see table a16 in online appendix)      ********************
********************************************************************************

/*united states*/
clustse regress us_4 edu_level labor edulab demo income income2 ///
unequal situation conser patriot pointerest urban male religiosity ///
age occupation_d1-occupation_d6, cluster(country) reps(5000) method(pairs)
 /*clustse is a user-written command that requires installing
   if not be installed before (ssc install clustse)*/


/*china*/
clustse regress cn_4 edu_level capital educap demo income income2 ///
unequal situation conser patriot pointerest urban male religiosity ///
age occupation_d1-occupation_d6, cluster(country) reps(5000) method(pairs)


/*japan (exclude respondents in japan)*/
drop if country==1
clustse regress jp_4 edu_level labor edulab demo income income2 ///
unequal situation conser patriot pointerest urban male religiosity ///
age occupation_d1-occupation_d6, cluster(country) reps(5000) method(pairs)




